{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Bellman 方程求解\n",
    "2019年8月第一版第一次印刷：书中该例子计算有误，以此为准。（其他版次无误）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sympy\n",
    "from sympy import symbols\n",
    "sympy.init_printing()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 求解 Bellman 期望方程"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "v_hungry, v_full = symbols('v_hungry v_full')\n",
    "q_hungry_eat, q_hungry_none, q_full_eat, q_full_none = \\\n",
    "        symbols('q_hungry_eat q_hungry_none q_full_eat q_full_none')\n",
    "alpha, beta, gamma = symbols('alpha beta gamma')\n",
    "x, y = symbols('x y')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAEswAAAA0BAMAAADCV7e/AAAAMFBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAEJmrVLsiZnYy3YlEze/BN8mCAAAgAElEQVR4Ae19e5BmR3Xf+WbuvHZmZz9QxGsT7SBKxVpCYkBlSja2d2JRlMwf0RLJsRI5MAiHYFzUjlCFomwTWlIRbXkTacyjbEwCW6mKCYKgkTCw9iKYpCopCVfYNY+QwrVBOEBJgK1ZQAjxyOZ0nz7dp1/3uzP3zs6u9t6Sbnef8+tzTv/O6b53Zr+ZAejkeuCGYSd2Zi97STM7jYElc11FXLLfRt44ttYs2Cgb22kCbBB9EzNtCNz03LqYz7lgk9U1jrAJsAmmjq4kurMoaBxXY2Ah+FqSapUFgzsibh5oW754ed3YaR43++3bnoHzn4Gx4djJTlbxfLiymZ3GwIK5ziIu2G8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5F7f9gz0DPQM9Az0DPQM9Az0DLRlYOZD2sL/B+pBbKnh7qmWAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$$\\left \\{ q_{full eat} : \\frac{- \\alpha \\gamma^{2} x y - \\alpha \\gamma x + \\beta \\gamma^{2} x y - \\beta \\gamma^{2} y + 3 \\beta \\gamma y + \\gamma^{2} y - \\gamma y + \\gamma - 1}{\\alpha \\gamma^{2} x - \\alpha \\gamma x + \\beta \\gamma^{2} y - \\beta \\gamma y - \\gamma^{2} + 2 \\gamma - 1}, \\quad q_{full none} : \\frac{- \\alpha \\gamma^{2} x y + \\alpha \\gamma^{2} x - 2 \\alpha \\gamma x + \\beta \\gamma^{2} x y - \\beta \\gamma^{2} x - \\beta \\gamma^{2} y + \\beta \\gamma^{2} + \\beta \\gamma x + 3 \\beta \\gamma y - 5 \\beta \\gamma + 4 \\beta + \\gamma^{2} y - \\gamma^{2} - \\gamma y + 3 \\gamma - 2}{\\alpha \\gamma^{2} x - \\alpha \\gamma x + \\beta \\gamma^{2} y - \\beta \\gamma y - \\gamma^{2} + 2 \\gamma - 1}, \\quad q_{hungry eat} : \\frac{- \\alpha \\gamma^{2} x y + \\alpha \\gamma^{2} x + \\alpha \\gamma^{2} y - \\alpha \\gamma^{2} - 2 \\alpha \\gamma x - \\alpha \\gamma y + 5 \\alpha \\gamma - 4 \\alpha + \\beta \\gamma^{2} x y - \\beta \\gamma^{2} y + 3 \\beta \\gamma y - \\gamma^{2} x + \\gamma^{2} + \\gamma x - 4 \\gamma + 3}{\\alpha \\gamma^{2} x - \\alpha \\gamma x + \\beta \\gamma^{2} y - \\beta \\gamma y - \\gamma^{2} + 2 \\gamma - 1}, \\quad q_{hungry none} : \\frac{- \\alpha \\gamma^{2} x y + \\alpha \\gamma^{2} x - 2 \\alpha \\gamma x + \\beta \\gamma^{2} x y + 2 \\beta \\gamma y - \\gamma^{2} x + \\gamma x - 2 \\gamma + 2}{\\alpha \\gamma^{2} x - \\alpha \\gamma x + \\beta \\gamma^{2} y - \\beta \\gamma y - \\gamma^{2} + 2 \\gamma - 1}, \\quad v_{full} : \\frac{- \\alpha \\gamma x y - \\alpha \\gamma x + \\beta \\gamma x y - 2 \\beta \\gamma y + 4 \\beta y + \\gamma y + \\gamma - y - 1}{\\alpha \\gamma^{2} x - \\alpha \\gamma x + \\beta \\gamma^{2} y - \\beta \\gamma y - \\gamma^{2} + 2 \\gamma - 1}, \\quad v_{hungry} : \\frac{- \\alpha \\gamma x y + 3 \\alpha \\gamma x - 4 \\alpha x + \\beta \\gamma x y + 2 \\beta \\gamma y - \\gamma x - 2 \\gamma + x + 2}{\\alpha \\gamma^{2} x - \\alpha \\gamma x + \\beta \\gamma^{2} y - \\beta \\gamma y - \\gamma^{2} + 2 \\gamma - 1}\\right \\}$$"
      ],
      "text/plain": [
       "⎧                 2                  2          2                2            \n",
       "⎪            - α⋅γ ⋅x⋅y - α⋅γ⋅x + β⋅γ ⋅x⋅y - β⋅γ ⋅y + 3⋅β⋅γ⋅y + γ ⋅y - γ⋅y + γ\n",
       "⎨q_full_eat: ─────────────────────────────────────────────────────────────────\n",
       "⎪                           2                2              2                 \n",
       "⎩                        α⋅γ ⋅x - α⋅γ⋅x + β⋅γ ⋅y - β⋅γ⋅y - γ  + 2⋅γ - 1       \n",
       "\n",
       "                        2          2                  2          2        2   \n",
       " - 1               - α⋅γ ⋅x⋅y + α⋅γ ⋅x - 2⋅α⋅γ⋅x + β⋅γ ⋅x⋅y - β⋅γ ⋅x - β⋅γ ⋅y \n",
       "────, q_full_none: ───────────────────────────────────────────────────────────\n",
       "                                                              2               \n",
       "                                                           α⋅γ ⋅x - α⋅γ⋅x + β⋅\n",
       "\n",
       "     2                                    2      2                            \n",
       "+ β⋅γ  + β⋅γ⋅x + 3⋅β⋅γ⋅y - 5⋅β⋅γ + 4⋅β + γ ⋅y - γ  - γ⋅y + 3⋅γ - 2            \n",
       "──────────────────────────────────────────────────────────────────, q_hungry_e\n",
       " 2              2                                                             \n",
       "γ ⋅y - β⋅γ⋅y - γ  + 2⋅γ - 1                                                   \n",
       "\n",
       "         2          2        2        2                                      2\n",
       "    - α⋅γ ⋅x⋅y + α⋅γ ⋅x + α⋅γ ⋅y - α⋅γ  - 2⋅α⋅γ⋅x - α⋅γ⋅y + 5⋅α⋅γ - 4⋅α + β⋅γ \n",
       "at: ──────────────────────────────────────────────────────────────────────────\n",
       "                                               2                2             \n",
       "                                            α⋅γ ⋅x - α⋅γ⋅x + β⋅γ ⋅y - β⋅γ⋅y - \n",
       "\n",
       "          2                2      2                                      2    \n",
       "⋅x⋅y - β⋅γ ⋅y + 3⋅β⋅γ⋅y - γ ⋅x + γ  + γ⋅x - 4⋅γ + 3                 - α⋅γ ⋅x⋅y\n",
       "───────────────────────────────────────────────────, q_hungry_none: ──────────\n",
       " 2                                                                            \n",
       "γ  + 2⋅γ - 1                                                                  \n",
       "\n",
       "      2                  2                  2                                 \n",
       " + α⋅γ ⋅x - 2⋅α⋅γ⋅x + β⋅γ ⋅x⋅y + 2⋅β⋅γ⋅y - γ ⋅x + γ⋅x - 2⋅γ + 2          -α⋅γ⋅\n",
       "───────────────────────────────────────────────────────────────, v_full: ─────\n",
       "       2                2              2                                      \n",
       "    α⋅γ ⋅x - α⋅γ⋅x + β⋅γ ⋅y - β⋅γ⋅y - γ  + 2⋅γ - 1                            \n",
       "\n",
       "                                                                              \n",
       "x⋅y - α⋅γ⋅x + β⋅γ⋅x⋅y - 2⋅β⋅γ⋅y + 4⋅β⋅y + γ⋅y + γ - y - 1            -α⋅γ⋅x⋅y \n",
       "─────────────────────────────────────────────────────────, v_hungry: ─────────\n",
       "      2                2              2                                       \n",
       "   α⋅γ ⋅x - α⋅γ⋅x + β⋅γ ⋅y - β⋅γ⋅y - γ  + 2⋅γ - 1                             \n",
       "\n",
       "                                                         ⎫\n",
       "+ 3⋅α⋅γ⋅x - 4⋅α⋅x + β⋅γ⋅x⋅y + 2⋅β⋅γ⋅y - γ⋅x - 2⋅γ + x + 2⎪\n",
       "─────────────────────────────────────────────────────────⎬\n",
       "    2                2              2                    ⎪\n",
       " α⋅γ ⋅x - α⋅γ⋅x + β⋅γ ⋅y - β⋅γ⋅y - γ  + 2⋅γ - 1          ⎭"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "system = sympy.Matrix((\n",
    "        (1, 0, x-1, -x, 0, 0, 0),\n",
    "        (0, 1, 0, 0, -y, y-1, 0),\n",
    "        (-gamma, 0, 1, 0, 0, 0, -2),\n",
    "        ((alpha-1)*gamma, -alpha*gamma, 0, 1, 0, 0, 4*alpha-3),\n",
    "        (-beta*gamma, (beta-1)*gamma, 0, 0, 1, 0, -4*beta+2),\n",
    "        (0, -gamma, 0, 0, 0, 1, 1) ))\n",
    "sympy.solve_linear_system(system,\n",
    "        v_hungry, v_full,\n",
    "        q_hungry_none, q_hungry_eat, q_full_none, q_full_eat)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 求解 Bellman 最优方程"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "==== v(饿) = q(饿,不吃), v(饱) = q(饱,吃) ==== x = 0, y = 0 ====\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABQIAAAAyBAMAAAD1tbv4AAAAMFBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAEJmrVLsiZnYy3YlEze/BN8mCAAANfklEQVR4Ae1dfYxUVxU/b+bN1+7s7LNowaLswD9sQMgI/6xBw1qShvQPmVZi26B2aONHTJodIDH9o5VLCWHNKh2xpqlVuonRWqp1CmI3QexEUwMkutv6gTZZhUQaNtZ0twUqtYrn3vvumzfva97HfTOD7s3y7rn3nPs7v3vO2TdvZt4+ALDdVKL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pDKcxqPbOYtXWgTaKu6K09F6YpT684t4+5ykuxdMhwNlRvkJ14Wgby/LKTFfjECHYtA7mnq6r8n2y+0n2zeGwAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$$\\left \\{ q_{full eat} : - \\frac{1}{\\gamma - 1}, \\quad q_{full none} : \\frac{- \\beta \\gamma + 4 \\beta + \\gamma - 2}{\\gamma - 1}, \\quad q_{hungry eat} : \\frac{\\alpha \\gamma - 4 \\alpha - \\gamma + 3}{\\gamma - 1}, \\quad q_{hungry none} : \\frac{2}{\\gamma - 1}, \\quad v_{full} : - \\frac{1}{\\gamma - 1}, \\quad v_{hungry} : \\frac{2}{\\gamma - 1}\\right \\}$$"
      ],
      "text/plain": [
       "⎧             -1                 -β⋅γ + 4⋅β + γ - 2                α⋅γ - 4⋅α -\n",
       "⎨q_full_eat: ─────, q_full_none: ──────────────────, q_hungry_eat: ───────────\n",
       "⎩            γ - 1                     γ - 1                             γ - 1\n",
       "\n",
       " γ + 3                   2             -1                2  ⎫\n",
       "──────, q_hungry_none: ─────, v_full: ─────, v_hungry: ─────⎬\n",
       "                       γ - 1          γ - 1            γ - 1⎭"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "==== v(饿) = q(饿,吃), v(饱) = q(饱,吃) ==== x = 1, y = 0 ====\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAB60AAAA0BAMAAAAj07B4AAAAMFBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAEJmrVLsiZnYy3YlEze/BN8mCAAAZCklEQVR4Ae09bYxc1XVndt/OznhnZ0e4JQSKvUFCGBySBUuRK5p6S/IjRYpYElQa0YoJqDSNFHkJahSpUK5jpSxFxVugahMUvFXVSCFpmZjSWHIJo1atDFXiJSlCTWrFbgPCCoQ15TtJt+ee+/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zRUqDwau62+mzBtCXY9jIcZ35bvS267OWDjVMjAkTAxoEzgET4EnwgA8GsPwBxDjn6bLhKV/51JW5xJKmFZXvqs6C8YzPTuYbeYCVAclbVb76zk00jdYXdvLgatTVUGq+zoYC3mudBRsXWQyZizVSDKfkFXXMQ/kAx/8I11/bS4lJnZ1SyELHup9zNKT83nMFmY+1XmvfMI4O95EyjeBw5ZmH4YnfF7ejGFP40j7RzQ6RPdYI6tzCSVMqyvfVZ0F45me3cpRgOqgpM1qfz2HxvUNlqO0ugI24DMqGyuWn9xW2WLbHpJkPiFT12Y6oV17sL9DiImTatoe+35fh9DjNGH27MkD1M22noTZo8j+dA5LeQNjWLOdMYt/H6lwMpdQwpTmQGQUqfDeeBZSHaA6qIQ5Ug7NofQ1KFgdt8FS+UKGTYH7SIVkLiFT19Z07mz7ujSuv+qic48Slpu1eMbsyQNUExA0psHwYFrCDDx0yBimb6EM2eB93wUJ43y5hIy/QogLlt+MZ6G5AlQHZWwmaYcW0tcbrmB1fHJLZdYNzubrNW2xkMwldDglpIcaqLwswX1M43oCTulOaNmTB6iXZvgWYM/gLphkGfZMXHVl1aNJq/sS8pSVgbA8C6gPUAMoLZhF00z5gYLV8YktlZFHLsm8C30jhWRfQr6y89XzI5P/2/KpOTDpC/wcIsWxZE8eoKY/V9qmBNhtcrmwZdgt8ZnG2x5NWt2XkKesDITlWUB9gBpAacEsmmbKDxSsjk9sqcSHxqPtAz5FcPcl5ClLXm4p3C0LCjrbn9IIVFl0+nuilL6EotrOEgqJwKeiWmrLUVJfQmltX17kmP8HJtaC2LEC6F0AAAAASUVORK5CYII=\n",
      "text/latex": [
       "$$\\left \\{ q_{full eat} : - \\frac{1}{\\gamma - 1}, \\quad q_{full none} : \\frac{\\alpha \\gamma^{2} - 2 \\alpha \\gamma - 4 \\beta \\gamma + 4 \\beta - \\gamma^{2} + 3 \\gamma - 2}{\\alpha \\gamma^{2} - \\alpha \\gamma - \\gamma^{2} + 2 \\gamma - 1}, \\quad q_{hungry eat} : \\frac{- \\alpha \\gamma + \\left(4 \\alpha - 3\\right) \\left(\\gamma - 1\\right)}{\\gamma^{2} \\left(\\alpha - 1\\right) - \\gamma \\left(\\alpha - 1\\right) + \\gamma - 1}, \\quad q_{hungry none} : \\frac{\\alpha \\gamma^{2} - 2 \\alpha \\gamma - \\gamma^{2} - \\gamma + 2}{\\alpha \\gamma^{2} - \\alpha \\gamma - \\gamma^{2} + 2 \\gamma - 1}, \\quad v_{full} : - \\frac{1}{\\gamma - 1}, \\quad v_{hungry} : \\frac{- \\alpha \\gamma + \\left(4 \\alpha - 3\\right) \\left(\\gamma - 1\\right)}{\\gamma^{2} \\left(\\alpha - 1\\right) - \\gamma \\left(\\alpha - 1\\right) + \\gamma - 1}\\right \\}$$"
      ],
      "text/plain": [
       "⎧                                   2                          2              \n",
       "⎪             -1                 α⋅γ  - 2⋅α⋅γ - 4⋅β⋅γ + 4⋅β - γ  + 3⋅γ - 2    \n",
       "⎨q_full_eat: ─────, q_full_none: ─────────────────────────────────────────, q_\n",
       "⎪            γ - 1                          2          2                      \n",
       "⎩                                        α⋅γ  - α⋅γ - γ  + 2⋅γ - 1            \n",
       "\n",
       "                                                              2            2  \n",
       "               -α⋅γ + (4⋅α - 3)⋅(γ - 1)                    α⋅γ  - 2⋅α⋅γ - γ  -\n",
       "hungry_eat: ──────────────────────────────, q_hungry_none: ───────────────────\n",
       "             2                                                2          2    \n",
       "            γ ⋅(α - 1) - γ⋅(α - 1) + γ - 1                 α⋅γ  - α⋅γ - γ  + 2\n",
       "\n",
       "                                                               ⎫\n",
       " γ + 2           -1                 -α⋅γ + (4⋅α - 3)⋅(γ - 1)   ⎪\n",
       "──────, v_full: ─────, v_hungry: ──────────────────────────────⎬\n",
       "                γ - 1             2                            ⎪\n",
       "⋅γ - 1                           γ ⋅(α - 1) - γ⋅(α - 1) + γ - 1⎭"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "==== v(饿) = q(饿,不吃), v(饱) = q(饱,不吃) ==== x = 0, y = 1 ====\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAB4kAAAA0BAMAAABlZRPSAAAAMFBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAEJmrVLsiZnYy3YlEze/BN8mCAAAabklEQVR4Ae09DYykZ1nP7H67M3MzuztyCrWV3tKEcOUobLmEHKl4G0tMbUK6SCMaNJ3SiEhCbksjIQHs25Law1O6FogCQk+NJhS1w5XCmfKzmmjaGtqtijXghau2hAuF7lVKKRTP53ne3+/9+fb75vtmb9F7s/P+PP9/7843M9/MC9BcO/aGQXVhvRdfWp3pHMd4ETiXofHi9v+Ia2owtVHd3RfBJdWZznGMFYFzGRorbD8mTM9basLQXcPZZ6vL+Us4tFad6xzHOBE4l6FxorajeT6+rM3Lnh7qaZ1xfrn1XHX+x2DPenWuGhz3FfEWIgHaytQ02XtQOj12ZPsxydC2xK4vCtQUIpFPZzhZB1womqpAUW1U+3H9KvZGUUPY7OFjWg5kp/OCuvfes4wQlyRPwKurDL9CzviACFNl0OxFX1knpu4SdimLEKnoIhRk1sUkQsrgWb57PcDUmnzkEc2s2PS0qA8mUK4rDWUIorpUuhNm1APr9NWTgtxvvuTXWAZ78NYjL4oKRKSii1CoLCNjIiG6UKgWmm5BHM7/U6mi+1QdVX8MGe0LbnMjPZPjm6H/fZy5JHkCXn3Ng7WuGXiQJpbXQee7JGeOhKcsQqSiCynYrDk2hWXwLNf9FP0T21CPHKaZxa6VQjl/kcC6rjSTIYCoLpXuhBn1wDp99aTg/+8luG2ZhDyMj66Ay2ketIc1XYTCZFnVUsBsC4VqoeEWxGH2aalhhopv7DaC/knNfLeatIZy8qVl+AHOXBJCPF9iVd9byi2htf/gIA9pZHUpwF0k6DB1vkUEo4ZIRRdQSLPaI0XG5Plu934K5LvVI49rZP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pdSKl4wJJnuwGjHYXWy1SUENxM0XaeJwx4h1zJyWqkr2QtPt1hNn7Oh5cIIV3kyqcTRmAjvbIuQWWWfmKP0Gv8SNCwvvwJQWzQ+Du0CtAM2UCQ1ztGnQNo3FJhRg85G3hch2nz1/TNgaMsGKKZVSo15VbRFT5A5Mq80KqjlLirxtnSV3n6qkQG59ZPEyzkJ6WlQm9MyMOfp+Hp/ll4an9sRRircZGtt9ubm3eBiZCRrwpj3jEq1zTTNZXxxtOcrJL4xnURMKsJlwjbvPXcRTnKeY+CrqT3WtVkyplFoFkrGIybzvZINntVlBNWcpka1vK8G3iSoaDPHFEa6OhkW+sRujLyDXqHqjo3TOOWfNE9ra8ADmK8fOoVw+SYTJ0eZTT3gttPyoCQXYSKK0qJJfnbXkk5hF/amuyBEzVkoLmF4YWuNoC5HjQVIiz6cv+VBr//dATsr0/TVNtaQnzni/ngeX8eqFpsZ7Y4Tcoxhz6RjpnrPmSZseegD8sQUJcQ7l8kmmhz5EvpYOoNsAKM5KEbYw8k70tsGJqIqGTHDEjJXSAqZXhXY72kLkeJCEyOzbAy3vuhU9+z89vjXp3fuTmIJzt9JMSWnnEDsgAmOlNM2kT+A7O559dJX0/i9nyuwHHpkBaAAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$$\\left \\{ q_{full eat} : \\frac{- \\beta \\gamma^{2} + 3 \\beta \\gamma + \\gamma^{2} - 1}{\\beta \\gamma^{2} - \\beta \\gamma - \\gamma^{2} + 2 \\gamma - 1}, \\quad q_{full none} : \\frac{2 \\left(\\beta \\gamma - \\left(2 \\beta - 1\\right) \\left(\\gamma - 1\\right)\\right)}{\\gamma^{2} \\left(\\beta - 1\\right) - \\gamma \\left(\\beta - 1\\right) + \\gamma - 1}, \\quad q_{hungry eat} : \\frac{4 \\alpha \\gamma - 4 \\alpha - \\beta \\gamma^{2} + 3 \\beta \\gamma + \\gamma^{2} - 4 \\gamma + 3}{\\beta \\gamma^{2} - \\beta \\gamma - \\gamma^{2} + 2 \\gamma - 1}, \\quad q_{hungry none} : \\frac{2}{\\gamma - 1}, \\quad v_{full} : \\frac{2 \\left(\\beta \\gamma - \\left(2 \\beta - 1\\right) \\left(\\gamma - 1\\right)\\right)}{\\gamma^{2} \\left(\\beta - 1\\right) - \\gamma \\left(\\beta - 1\\right) + \\gamma - 1}, \\quad v_{hungry} : \\frac{2}{\\gamma - 1}\\right \\}$$"
      ],
      "text/plain": [
       "⎧                  2            2                                             \n",
       "⎪             - β⋅γ  + 3⋅β⋅γ + γ  - 1                 2⋅(β⋅γ - (2⋅β - 1)⋅(γ - \n",
       "⎨q_full_eat: ─────────────────────────, q_full_none: ─────────────────────────\n",
       "⎪               2          2                          2                       \n",
       "⎩            β⋅γ  - β⋅γ - γ  + 2⋅γ - 1               γ ⋅(β - 1) - γ⋅(β - 1) + \n",
       "\n",
       "                                      2            2                          \n",
       "1))                  4⋅α⋅γ - 4⋅α - β⋅γ  + 3⋅β⋅γ + γ  - 4⋅γ + 3                \n",
       "─────, q_hungry_eat: ─────────────────────────────────────────, q_hungry_none:\n",
       "                                2          2                                  \n",
       "γ - 1                        β⋅γ  - β⋅γ - γ  + 2⋅γ - 1                        \n",
       "\n",
       "                                                               ⎫\n",
       "   2             2⋅(β⋅γ - (2⋅β - 1)⋅(γ - 1))                2  ⎪\n",
       " ─────, v_full: ──────────────────────────────, v_hungry: ─────⎬\n",
       " γ - 1           2                                        γ - 1⎪\n",
       "                γ ⋅(β - 1) - γ⋅(β - 1) + γ - 1                 ⎭"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "==== v(饿) = q(饿,吃), v(饱) = q(饱,不吃) ==== x = 1, y = 1 ====\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAACooAAAA0BAMAAABFxuXWAAAAMFBMVEX///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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hjCtEd8skSt6UT+h2LvUysstfy6A6wiqZGoAEos9DaeOkPuOyo4uDkXCpfTQy48ygjCuZ7uJ7vlRCZhW1RonXfM8G1WdDXvxWuiL774i0N6LhYCQUfVX9R7SaeklqIx2NvWU8G0KHuQJahBNAc9kTyrgjFhPG8WLaSTMSA8bx0sUWjdWsR+gwVyIiAQQYTTEglHExcxrj9vSkPQHGnWmXJtGIzVqEDutYiMryiJI3vQzTzvW0q13+WgbVEdYpFgOQQPR5KG2c1Pf4OpjtcCljxvOsDEohUAINYFsvlVDUme14yeN8zwY9qRbIi99KV2T/HZH2RkE7GAlFv21Oze7jqi94fWuuvo+aNXxAeiG0rxk4jYiMTh5mlJYxiMZq/PkoJ8QHpJzQSMwREbmCPMwoLXsQjdh49VFOiA9IOaGRyCMicrVCRNVyeXHgYyGvCKsUow9IeR4a3R/tLQ+jBTvuo5EZ6wDlGgoAIV8qoagzvdDyunzPPpoXv8Uusv8RkQk8hVW+3lA6Qy/qgTHpaDCeq+Whw03S9gApNmi7hxXkRPcRdU9jedNYrJlHDzUkgqe1wsSgkZgjIrNKHmaUlj3wqHj+PNRQ6UGiiln+pvroKdoOH5DyPNTbOPIj+zzMUexkEo3MGPqoSaAPSIulEoo6MzEsZ5Dv2Ufz4sfPZyiQyP5HRKQdLXUBvvcHpHLzJI02+o0d2NiBjR3Y2IEOd6D290Lx/wEF0zs+L01+EgAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$$\\left \\{ q_{full eat} : \\frac{- \\alpha \\gamma^{2} - \\alpha \\gamma + 3 \\beta \\gamma + \\gamma^{2} - 1}{\\alpha \\gamma^{2} - \\alpha \\gamma + \\beta \\gamma^{2} - \\beta \\gamma - \\gamma^{2} + 2 \\gamma - 1}, \\quad q_{full none} : \\frac{- 2 \\alpha \\gamma - \\beta \\gamma + 4 \\beta + 2 \\gamma - 2}{\\alpha \\gamma^{2} - \\alpha \\gamma + \\beta \\gamma^{2} - \\beta \\gamma - \\gamma^{2} + 2 \\gamma - 1}, \\quad q_{hungry eat} : \\frac{2 \\alpha \\gamma - 4 \\alpha + 3 \\beta \\gamma - 3 \\gamma + 3}{\\alpha \\gamma^{2} - \\alpha \\gamma + \\beta \\gamma^{2} - \\beta \\gamma - \\gamma^{2} + 2 \\gamma - 1}, \\quad q_{hungry none} : \\frac{- 2 \\alpha \\gamma + \\beta \\gamma^{2} + 2 \\beta \\gamma - \\gamma^{2} - \\gamma + 2}{\\alpha \\gamma^{2} - \\alpha \\gamma + \\beta \\gamma^{2} - \\beta \\gamma - \\gamma^{2} + 2 \\gamma - 1}, \\quad v_{full} : \\frac{- 2 \\alpha \\gamma - \\beta \\gamma + 4 \\beta + 2 \\gamma - 2}{\\alpha \\gamma^{2} - \\alpha \\gamma + \\beta \\gamma^{2} - \\beta \\gamma - \\gamma^{2} + 2 \\gamma - 1}, \\quad v_{hungry} : \\frac{2 \\alpha \\gamma - 4 \\alpha + 3 \\beta \\gamma - 3 \\gamma + 3}{\\alpha \\gamma^{2} - \\alpha \\gamma + \\beta \\gamma^{2} - \\beta \\gamma - \\gamma^{2} + 2 \\gamma - 1}\\right \\}$$"
      ],
      "text/plain": [
       "⎧                     2                  2                                    \n",
       "⎪                - α⋅γ  - α⋅γ + 3⋅β⋅γ + γ  - 1                         -2⋅α⋅γ \n",
       "⎨q_full_eat: ──────────────────────────────────────, q_full_none: ────────────\n",
       "⎪               2            2          2                            2        \n",
       "⎩            α⋅γ  - α⋅γ + β⋅γ  - β⋅γ - γ  + 2⋅γ - 1               α⋅γ  - α⋅γ +\n",
       "\n",
       "                                                                              \n",
       "- β⋅γ + 4⋅β + 2⋅γ - 2                         2⋅α⋅γ - 4⋅α + 3⋅β⋅γ - 3⋅γ + 3   \n",
       "──────────────────────────, q_hungry_eat: ────────────────────────────────────\n",
       "    2          2                             2            2          2        \n",
       " β⋅γ  - β⋅γ - γ  + 2⋅γ - 1                α⋅γ  - α⋅γ + β⋅γ  - β⋅γ - γ  + 2⋅γ -\n",
       "\n",
       "                                 2            2                               \n",
       "                     -2⋅α⋅γ + β⋅γ  + 2⋅β⋅γ - γ  - γ + 2                 -2⋅α⋅γ\n",
       "──, q_hungry_none: ──────────────────────────────────────, v_full: ───────────\n",
       "                      2            2          2                       2       \n",
       " 1                 α⋅γ  - α⋅γ + β⋅γ  - β⋅γ - γ  + 2⋅γ - 1          α⋅γ  - α⋅γ \n",
       "\n",
       "                                                                             ⎫\n",
       " - β⋅γ + 4⋅β + 2⋅γ - 2                     2⋅α⋅γ - 4⋅α + 3⋅β⋅γ - 3⋅γ + 3     ⎪\n",
       "───────────────────────────, v_hungry: ──────────────────────────────────────⎬\n",
       "     2          2                         2            2          2          ⎪\n",
       "+ β⋅γ  - β⋅γ - γ  + 2⋅γ - 1            α⋅γ  - α⋅γ + β⋅γ  - β⋅γ - γ  + 2⋅γ - 1⎭"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "xy_tuples = ((0, 0), (1, 0), (0, 1), (1, 1))\n",
    "for x, y in xy_tuples:\n",
    "    system = sympy.Matrix((\n",
    "            (1, 0, x-1, -x, 0, 0, 0),\n",
    "            (0, 1, 0, 0, -y, y-1, 0),\n",
    "            (-gamma, 0, 1, 0, 0, 0, -2),\n",
    "            ((alpha-1)*gamma, -alpha*gamma, 0, 1, 0, 0, 4*alpha-3),\n",
    "            (-beta*gamma, (beta-1)*gamma, 0, 0, 1, 0, -4*beta+2),\n",
    "            (0, -gamma, 0, 0, 0, 1, 1) ))\n",
    "    result = sympy.solve_linear_system(system,\n",
    "            v_hungry, v_full,\n",
    "            q_hungry_none, q_hungry_eat, q_full_none, q_full_eat, simplification=True)\n",
    "    msgx = 'v(饿) = q(饿,{}吃)'.format('' if x else '不')\n",
    "    msgy = 'v(饱) = q(饱,{}吃)'.format('不' if y else '')\n",
    "    print('==== {}, {} ==== x = {}, y = {} ===='.format(msgx, msgy, x, y))\n",
    "    display(result)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
